<div ng-controller="ActivityCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <form name="itemForm" novalidate ng-submit="saveData()">
        <ul class="sui-breadcrumb">
            <li><a href="#/activity/list">{{'活动页面'| translate}}</a></li>
            <li class="active">
                {{"创建"|translate}}
            </li>
        </ul>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'小程序'| translate}}：</label>
            <div class="controls">
                <wx-app-list ng-model="activity.app_id" dft="1" ary="storeary" storedata="1"> </wx-app-list>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'活动标题'| translate}}：</label>
            <div class="controls">
                <input ng-model="activity.title" name="title" type="text" value="" class="input-xlarge" required>
                <div ng-show="itemForm.title.$error.required" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"> {{'副标题'| translate}}：</label>
            <div class="controls">
                <textarea rows="3" ng-model="activity.note" class="input-xlarge"></textarea>
            </div>
        </div>
         <div class="control-group">
            <label class="control-label v-top"> {{'是否可见'| translate}}：</label>
            <div class="controls">
                <visible ng-model="activity.visible"></visible>
            </div>
        </div>
        
        <div class="control-group">
             <label class="control-label v-top"> {{'活动主图'| translate}}：</label>
            <div class="controls">
                <ul class="sui-row-fluid">
                    <li class="span4">
                        <div>
                            <img ng-src="{{activity.img}}" style="width:600px;height: 170px">
                        </div>
                        <label>
                            <br/> 链接：
                            <input ng-model="activity.img" type="text" name="img" value="" style="width:100px">
                            
                            <attachment owner-id="activity.activity_page_id ?activity.activity_page_id:1" owner-type="activity" dhf-ng-model="activity.img" xtype="url" mult="false" title="Upload" use-type="png,jpeg,gif,jpg,JPG,PNG,JPEG,GIF"></attachment>
                        </label>
                    </li>
                </ul>
                <div>
                    <input ng-model="activity.img" type="hidden" value="" name="img" class="input-xlarge" required>
                </div>
            </div>
        </div> 
        <!-- <div class="control-group" ng-show="false">
            <label class="control-label v-top"><b style="color: #f00;">*</b>{{'相关活动'| translate}}：</label>
            <div class="controls">
                <input ng-model="activity.outer_id" name="outer_id" type="text" value="" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group" ng-show="false">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'选择商品'| translate}}：</label>
            <div class="controls">
                <type-id ng-model="activity.type_id"></type-id>
            </div>
        </div>
        <div class="control-group" ng-show="false">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'选择类目'| translate}}：</label>
            <div class="controls">
                <on-shelves ng-model="activity.on_shelves" dft="1"></on-shelves>
            </div>
        </div> -->
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'活动内容'| translate}}：</label>
            <div class="controls">
                <ueditor ng-model="activity.content" style="width:70%" uid="{{acid}}"></ueditor>
                <div ng-show="itemForm.content.$error.required" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" id="submit" class="sui-btn btn-primary" ng-disabled="!(itemForm.$valid && activity.app_id && activity.content) ">
                    <span>{{'save' | translate}}</span>
                </button>
            </div>
        </div>
    </form>
</div>